#ifndef CLOUD_DISK_SERVER_H
#define CLOUD_DISK_SERVER_H

#include "NoCopy.h"
#include <wfrest/HttpServer.h>

namespace l
{
    class CloudDiskServer
        :public NoCopy
    {
    public:

        CloudDiskServer() {};

        ~CloudDiskServer() {};

        int start(unsigned short port) {
            return m_http_server.start(port);
        }

        void stop() {
            m_http_server.stop();
        }

        void list_routes() {
            m_http_server.list_routes();
        }

        CloudDiskServer& track() {
            m_http_server.track();
            return *this;
        }

        //注册路由
        void register_modules();

    private:
        //注册静态资源获取路由
        void register_static_resources_module();

        //注册注册路由
        void register_signup_module();

        //注册登录路由
        void register_signin_module();

        //注册获取user信息路由
        void register_userinfo_module();

        //注册文件上传路由
        void register_fileupload_module();

        //注册获取文件列表路由
        void register_filelist_module();

        //注册文件下载路由
        void register_filedownload_module();

    private:

        wfrest::HttpServer m_http_server;

    };//end of class CLoudDisk

}//end of namespace l
#endif